package org.xxpay.core.entity;

import java.util.Date;

public class AlipayCashUser extends BaseModel implements Cloneable {

    public static final byte STATE_STOP = 0; //状态：暂停
    public static final byte STATE_AVAILABLE = 1; //状态：正常
    public static final byte STATE_LIMIT = 2; //状态：金额限制

    /** 实现克隆接口, 浅克隆 */
    @Override
    public Object clone(){
        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }

    /**
     * ID
     *
     * @mbggenerated
     */
    private Integer id;

    /**
     * 支付宝登录账号， 邮箱或手机号
     *
     * @mbggenerated
     */
    private String alipayLoginId;

    /**
     * 总收款金额, 单位：分
     *
     * @mbggenerated
     */
    private Long totalMoney;

    /**
     * 下发最大额度, 单位：分， 0不限制
     *
     * @mbggenerated
     */
    private Long totalMoneyLimit;

    /**
     * 昨日收款金额, 单位：分
     *
     * @mbggenerated
     */
    private Long yesterdayMoney;

    /**
     * 今日收款金额, 单位：分
     *
     * @mbggenerated
     */
    private Long todayMoney;

    /**
     * 备注
     *
     * @mbggenerated
     */
    private String remark;

    /**
     * 状态：0-暂停分账, 1-正常分账, 2-金额限制分账
     *
     * @mbggenerated
     */
    private Byte status;

    /**
     * 创建者ID
     *
     * @mbggenerated
     */
    private Long createUserId;

    /**
     * 创建时间
     *
     * @mbggenerated
     */
    private Date createTime;

    /**
     * 更新时间
     *
     * @mbggenerated
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAlipayLoginId() {
        return alipayLoginId;
    }

    public void setAlipayLoginId(String alipayLoginId) {
        this.alipayLoginId = alipayLoginId;
    }

    public Long getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(Long totalMoney) {
        this.totalMoney = totalMoney;
    }

    public Long getTotalMoneyLimit() {
        return totalMoneyLimit;
    }

    public void setTotalMoneyLimit(Long totalMoneyLimit) {
        this.totalMoneyLimit = totalMoneyLimit;
    }

    public Long getYesterdayMoney() {
        return yesterdayMoney;
    }

    public void setYesterdayMoney(Long yesterdayMoney) {
        this.yesterdayMoney = yesterdayMoney;
    }

    public Long getTodayMoney() {
        return todayMoney;
    }

    public void setTodayMoney(Long todayMoney) {
        this.todayMoney = todayMoney;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", alipayLoginId=").append(alipayLoginId);
        sb.append(", totalMoney=").append(totalMoney);
        sb.append(", totalMoneyLimit=").append(totalMoneyLimit);
        sb.append(", yesterdayMoney=").append(yesterdayMoney);
        sb.append(", todayMoney=").append(todayMoney);
        sb.append(", remark=").append(remark);
        sb.append(", status=").append(status);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AlipayCashUser other = (AlipayCashUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getAlipayLoginId() == null ? other.getAlipayLoginId() == null : this.getAlipayLoginId().equals(other.getAlipayLoginId()))
                && (this.getTotalMoney() == null ? other.getTotalMoney() == null : this.getTotalMoney().equals(other.getTotalMoney()))
                && (this.getTotalMoneyLimit() == null ? other.getTotalMoneyLimit() == null : this.getTotalMoneyLimit().equals(other.getTotalMoneyLimit()))
                && (this.getYesterdayMoney() == null ? other.getYesterdayMoney() == null : this.getYesterdayMoney().equals(other.getYesterdayMoney()))
                && (this.getTodayMoney() == null ? other.getTodayMoney() == null : this.getTodayMoney().equals(other.getTodayMoney()))
                && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
                && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
                && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAlipayLoginId() == null) ? 0 : getAlipayLoginId().hashCode());
        result = prime * result + ((getTotalMoney() == null) ? 0 : getTotalMoney().hashCode());
        result = prime * result + ((getTotalMoneyLimit() == null) ? 0 : getTotalMoneyLimit().hashCode());
        result = prime * result + ((getYesterdayMoney() == null) ? 0 : getYesterdayMoney().hashCode());
        result = prime * result + ((getTodayMoney() == null) ? 0 : getTodayMoney().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }
}